<template>
     <div class="header">
      <div class="title"></div>
      <div class="theme">
        <span>您好，{{ userInfo.userName }}</span>
        <span @click="logout"> <span class="out_icon"></span> 退出 </span>
      </div>
    </div>
</template>

<script>
    export default {
        data(){
            return{

            }
        },
        methods: {
            logout() {
            localStorage.removeItem("USER_ID");
            localStorage.removeItem("TOKEN");
            var rememberMe = this.$Cookies.get("chksave");
            if(rememberMe && rememberMe == "false"){
                this.$Cookies.remove("loginName",{expires:7,path:"/"});
                this.$Cookies.remove("password",{expires:7,path:"/"});
                this.$Cookies.remove("chksave",{expires:7,path:"/"});
            }
            this.$router.push("/");
            },
        }
    }
</script>

<style lang="less" scoped>
 .home_light .header {
    position: relative;
    width: 100%;
    height: 94px;
    padding: 0 120px 0 145px;
    background-color: #fff;
    box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.09714285714285708);
    box-sizing: border-box;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .title {
      width: 430px;
      height: 30px;
      float: left;
      background: url(../assets/image/title_00.png) no-repeat;
      background-size: 100% 100%;
    }
    .theme {
      float: right;
      line-height: 94px;
      cursor: pointer;
      i {
        display: inline-block;
        width: 17px;
        height: 17px;
      }
      .light {
        border: 1px solid #d9d9d9;
        background-color: #fff;
      }
      .dark {
        border: 1px solid #cccccc;
        background-color: #000;
      }
    }
    .header-right-box {
        display: flex;
        align-items: center;
        font-size: 14px;
        .header-menu-box{
            display: flex;
            width: 250px;
            margin-right: 10px;
            justify-content: space-between;
        }
        .header-search-box{
            display: flex;
            .el-button--primary{
                display: flex;
                justify-content: center;
                align-items: center;
                width: 70px;
            }
        }
    }
  }
</style>